package com.javajun.douban.entity;

/**
 * @className: YumImage
 * @description: 杨小杰新浪图片上传API返回的Json格式  https://api.yum6.cn/sinaimg.php
 * @author: JavaJun
 * @date: 2018年11月28日
 */
public class YumImage {

    // 状态码：200->正常；201->错误
    private Integer code;
    // 图片高度(px)
    private Integer width;
    //  图片宽度(px)
    private Integer height;
    // 附件大小(Bytes)
    private Integer size;
    // 新浪图片pid
    private String pid;
    private String url;
    
    public Integer getCode() {
        return code;
    }
    public void setCode(Integer code) {
        this.code = code;
    }
    public Integer getWidth() {
        return width;
    }
    public void setWidth(Integer width) {
        this.width = width;
    }
    public Integer getHeight() {
        return height;
    }
    public void setHeight(Integer height) {
        this.height = height;
    }
    public Integer getSize() {
        return size;
    }
    public void setSize(Integer size) {
        this.size = size;
    }
    public String getPid() {
        return pid;
    }
    public void setPid(String pid) {
        this.pid = pid;
    }
    public String getUrl() {
        return url;
    }
    public void setUrl(String url) {
        this.url = url;
    }

    public String getRealURL() {
        return "https://ww2.sinaimg.cn/large/"+ pid +".jpg";
    }
    
    @Override
    public String toString() {
        return "YumImage [code=" + code + ", width=" + width + ", height=" + height + ", size=" + size + ", pid=" + pid
                + ", url=" + url + ",RealUrl=" + getRealURL() +"]";
    }
}
